package com.example.chengche_lol;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.Toast;

import com.example.chengche_lol.ui.MainActivity;

public class SetActivity extends AppCompatActivity {

    private ImageView btn_setback;
    Button set_exit;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_set);

        btn_setback = findViewById(R.id.btn_setback);
        set_exit = findViewById(R.id.set_exit);

        btn_setback.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Toast.makeText(SetActivity.this, "正在返回主页面~", Toast.LENGTH_SHORT).show();
                Intent intent = new Intent();
                intent.setClass(SetActivity.this, MainActivity.class);
                startActivity(intent);
            }
        });

        set_exit.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Toast.makeText(SetActivity.this, "正在返回登录页面~", Toast.LENGTH_SHORT).show();
                Intent intent = new Intent();
                intent.setClass(SetActivity.this, LoginActivity.class);
                startActivity(intent);
            }
        });
    }

}